package cn.yunyichina.scheduler.jobs.constant;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Lullaby on 2016/8/17.
 */
public class CacheConstant {

    public static Logger logger = LoggerFactory.getLogger("Cache");
    
    public static DateFormat df = new SimpleDateFormat("yyyy-MM-dd");

    
    public static final String CACHE_HOSPITAL_HASH_KEY_PREFIX = "hospital.hash";

    
    public static final String CACHE_BRANCH_HOSPITAL_HASH_KEY_PREFIX = "branch.hospital.hash";

    
    public static final String CACHE_CODE_INTERFACE_KEY_PREFIX = "hospital.code.interface";

    
    public static final String CACHE_APP_CODE_KEY_PREFIX = "hospital.app.interface";

   
    public static final String CACHE_APP_SECRET_KEY_PREFIX = "hospital.app.secret";

    
    public static final String CACHE_HOSPITAL_RULES_KEY_PREFIX = "hospital.rules.hash";

    
    public static final String CAHCE_DOCTOR_KEY_PREFIX = "hospital.doctor:";

    
    public static final String SYSTEM_MANAGER_CACHE_DEPT_HASH_PREFIX = "hospital.dept";

    
    public static final String CACHE_NAME_DEPT_HASH_PREFIX = "hospital.dept.name.hash";

    
    public static final String CACHE_LEVELONE_DEPT_HASH_PREFIX = "hospital.dept.levelOne.hash";

   
    public static final String CACHE_LEVELTWO_DEPT_HASH_PREFIX = "hospital.dept.levelTwo.hash";

   
    public static final String CACHE_EASYHEALTH_LEVELONE_DEPT_HASH_PREFIX = "easyHealth.hospital.dept.levelOne.hash";

    
    public static final String CACHE_EASYHEALTH_LEVELTWO_DEPT_HASH_PREFIX = "easyHealth.hospital.dept.levelTwo.hash";

   
    public static final String CACHE_EASYHEALTH_DEPT_NAME_HASH_PREFIX = "easyHealth.dept.name.hash";

    
    public static final String CACHE_DOCTOR_NAME_HASH_PREFIX = "hospital.doctor.name.hash:";

    public static final String CACHE_AREA_DOCTOR_NAME_HASH_PREFIX = "area.doctor.name.hash:";

    public static final String CACHE_HOSPITAL_DOCTOR_NAME_HASH_PREFIX = "hospital.doctor.name.hash:";

    
    public static final String CACHE_DOCTOR_HASH_PREFIX = "hospital.doctor.hash";

    
    public static final String CACHE_EASYHEALTH_APPOINTMENT_DOCTOR_HASH_PREFIX = "easyHealth.appointment.doctor.hash";

    
    public static final String CACHE_REG_RECORD_INFO_PREFIX = "reg:";

    
    public static final String CACHE_CLINIC_RECORD_INFO_PREFIX = "clinic:";

    
    public static final String CACHE_ALIPAY_APPID_PREFIX = "alipay:";

    
    public static final String CACHE_DEPOSIT_RECORD_INFO_PREFIX = "deposit:";

    
    public static final String CACHE_PAY_INFO_HASH_PREFIX = "pay:";

    
    public static final String CACHE_REFUND_INFO_HASH_PREFIX = "refund:";

    
    public static final String CACHE_MEDICAL_CARD_HASH_PREFIX = "medicalCard:";

    
    public static final String CACHE_HAD_REG_DOCTOR = "hadRegDoctor:";

    
    public static final String CACHE_KEY_SPLIT_CHAR = ":";

    
    public static final String CACHE_KEY_PATTERN_CHAR = "*";

    
    public static final String CACHE_OP_ADD = "cache_add";

   
    public static final String CACHE_OP_DEL = "cache_del";

   
    public static final String CACHE_OP_UPDATE = "cache_update";

    
    public static final String CACHE_NULL_STRING = "null";

    
    public static final String CACHE_REGISTER_HAVING_HASH = "register.having.hash:";

    
    public static final String CACHE_REGISTER_NOT_PAY_HAD_HASH = "register.notpay.had.hash:";

    
    public static final String CACHE_REGISTER_NEED_UNLOCK = "register.need.unlock:";

    
    public static final String CACHE_REGISTER_EXCEPTION = "register.exception.list:";

    
    public static final String CACHE_CLINIC_EXCEPTION = "clinic.exception.list:";

    
    public static final String CACHE_DEPOSIT_EXCEPTION = "deposit.exception.list";

   
    public static final String CACHE_STOP_REGISTER_EXCEPTION = "stop.register.exception.hash";

    
    public static final String CACHE_STOP_REGISTER_PREVENT = "stop.register.prevent.hash";

    
    public static final String CACHE_PAY_TYPE_WEIXIN = "wechat";

    
    public static final String CACHE_PAY_TYPE_ALIPAY = "alipay";

    
    public static final String CACHE_KEY_NOT_EXIST = "nil";

    
    public static final String CACHE_PARENT_DEPT_CODE = "0";

    public static final String SPLIT_CHAR = "_";

    public static final String UPDATE_OP_TYPE_ADD = "add";

    public static final String UPDATE_OP_TYPE_UPDATE = "update";

    public static final String UPDATE_OP_TYPE_DEL = "delete";

    
    public static final String REG_SOURCE = "regSource";

   
    public static final String CACHE_REGISTER_REG_SOURCE = "register.reg.source.hash:";

    
    public static final String CACHE_REGISTER_REG_TIME_SOURCE = "register.reg.time.source.hash:";

    
    public static final String APPOINTMENT = "appointment";
    
    public static final String CACHE_MSG_TEMPLATE = "msg.template.hash";
   
    public static final String CACHE_MSG_CUSTOMER = "msg.customer.hash";
    
    public static final String CACHE_MSG_LIBRARY = "msg.library.hash";

   
    public static final String CACHE_WHITE_LIST = "white.list.hash";

   
    public static final int ONE_DAY_SECONDS = 86400;

    
    public static final String CACHE_ROLE_RESOURCE = "role.resource.hash";

    
    public static final String CACHE_USER_ROLE = "user.role.hash";

   
    public static final int SEVEN_DAY_SECONDS = 604800;

    
    public static final String DEF_FOOT_LOGO_INFO = "云医科技出品";

    
    public static final Map<String, String> cacheTypeMap = new HashMap<String, String>();

    static {
        cacheTypeMap.put(CACHE_APP_CODE_KEY_PREFIX, "平台配置信息");
        cacheTypeMap.put(CACHE_HOSPITAL_RULES_KEY_PREFIX, "医院规则配置");
        cacheTypeMap.put(CACHE_DOCTOR_HASH_PREFIX, "医生信息");
        cacheTypeMap.put(SYSTEM_MANAGER_CACHE_DEPT_HASH_PREFIX, "科室信息");
        cacheTypeMap.put(CACHE_MEDICAL_CARD_HASH_PREFIX, "就诊卡");
        cacheTypeMap.put(CACHE_REGISTER_HAVING_HASH, "预约中订单");
        cacheTypeMap.put(CACHE_REGISTER_NOT_PAY_HAD_HASH, "已预约未支付订单");

        cacheTypeMap.put(CACHE_REGISTER_NEED_UNLOCK, "待解锁号源");
        cacheTypeMap.put(CACHE_REGISTER_EXCEPTION, "挂号异常队列");

        cacheTypeMap.put(CACHE_CLINIC_EXCEPTION, "门诊异常队列");
        cacheTypeMap.put(CACHE_STOP_REGISTER_EXCEPTION, "停诊异常队列");

    }

    
    public static final String CACHE_SMS_CODE = "sms.code.hash";
    
    public static final String CACHE_HOSPITAL_WECHAT_TOKEN_KEY_PREFIX = "hospital.wechat.token.hash";

   
    public static final String CACHE_AREA_OPTION_KEY_PREFIX = "area.option.hash:";

    public static final String CACHE_HOSPITAL_BASEINFO = "hospital.baseInfo";

    public static final String CACHE_CARD_ORG_NAME = "card.org.name:";

    public static final String CACHE_MEDICAL_CARD_ID = "medical.card.id:";

    public static final String CACHE_ORDER_REG = "orderReg:";

    public static final String CACHE_LOCK_ORDER_REG = "lock.orderReg:";

    
    public static final String CACHE_CLINIC_TRADE_PAY_RECORD_INFO_PREFIX = "clinic.trade.pay:";

}
